package com.lcj.mis.controller;

import com.lcj.common.util.Result;
import com.lcj.mis.controller.form.IdForm;
import com.lcj.mis.controller.form.SearchMonitoringForm;
import com.lcj.mis.service.MonitoringService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * 订单监控Controller
 */
@RestController
@RequestMapping("/monitoring")
public class MonitoringController {

    @Resource
    private MonitoringService monitoringService;

    @PostMapping("/searchOrderMonitoringByPage")
    public Result searchOrderMonitoringByPage(@RequestBody @Valid SearchMonitoringForm form){
        Result result = monitoringService.searchOrderMonitoringByPage(form);
        return result;
    }

    @PostMapping("/searchOrderMonitoringDetail")
    public Result searchOrderMonitoringDetail(@RequestBody @Valid IdForm form){
        Result result = monitoringService.searchOrderMonitoringDetail(form);
        return result;
    }
}
